<%@page import="transfer.Warehouse"%>
<%@page import="content.WarehouseContent"%>
<%@page import="java.util.ArrayList"%>
    <H3>Report Filter</H3>
<%
    ArrayList warehouses = WarehouseContent.getAllWarehouses();
%>
<table id="cart-table">
    <tr>
    <td>Warehouse:
        <select id="warehouse_selection">
            <option id="">All</option>
            <%
                for (int i = 0; i < warehouses.size(); i++) {
                    Warehouse w = (Warehouse) warehouses.get(i);
            %>
                <option id="<%= w.getIdWarehouse() %>"><%= w.getNameWarehouse() %></option>
            <%
                }
            %>
        </select>
    </td>
    <td>
    <h>Start Record:</h><input class="inp-amount" id="start_record" type="number" min="1" step="1" value="1" onkeydown = "javascript: return is_positive_int(event, $(this).val());">
    </td>
    <td>
        <h>Records Quantity:</h><input class="inp-amount" id="records_quantity" type="number" min="0" step="1" value="20" onkeydown = "javascript: return is_positive_int(event, $(this).val());">
    </td>
    <td>
        <input type="button" class="btn-buy" value="Generate" id="generate_report" onclick="generatePopularityReport()">
    </td>
</tr>
</table>

<div class="float_left" style="padding-left: 15px;">
    <div class="box" style="width: 900px;">
        <table class="table" id="report-table" rules=all>
            <tr>
                <td>#</td>
                <td>Warehouse</td>
                <td>Commodity Name</td>
                <td>Commodity Popularity</td>
            </tr>
        </table>
    </div>
</div>

